home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine CD 1995
/
Archive Magazine CD 1995.iso
/
text
/
hints
/
volume_08
/
issue_11
< prev
next >
Wrap
Text File
|
1995-07-14
|
9KB
|
230 lines
8.11
LaserDirect double flush − I asked for help last month (8.10
p25) with what to do when I get a paper jam on my LaserDirect LBP8.
(This turns out to be one of those everybody-knows-about-it-except-me
problems.) Apparently, all I have to do is click on the LaserDirect icon
on the iconbar while holding <alt> down. This brings up a LaserDirect
Status window telling me the paper is jammed and offering me a way of
escape which I accept gratefully.
8.11
Many thanks to all those who wrote or phoned to tell me what a
gumby I am. I had been using the ‘Flush printer’ menu option from the
‘Printer Queue’ window (adjust-click on the iconbar icon) instead of
LaserDirect’s own flush system − you stupid boy!
8.11
(Mind you, from some of the suggestions people made, like “hit
<f12><return>”, I suspect that I may not be the only person to have had
this problem and not realised how simple the solution was!)
8.11
Ed.
8.11
Printing from Basic programs (e.g. 8.10 pp21/47) − Here are a
couple of short points which may help. Firstly, ‘Page printing’ via a
printer driver.
8.11
The key SYS calls recommended for ‘proper’ printing via the
desktop still work in non-Wimp mode, so it is fairly straightforward to
produce hard copy of text output directly from Basic programs − albeit
in ‘graphic/page printing’ style.
8.11
A sequence which certainly works is:-
DEF PROCprint
SYS “PDriver_PageSize” TO width%,
height%,left%,bottom%,
right%,top%
pf%=OPENOUT(“printer:”)
SYS “PDriver_SelectJob”,pf%,
“Printer Test”
LOCAL ERROR
ON ERROR LOCAL:SYS “PDriver_AbortJob”,pf%:CLOSE#pf%
:
ENDPROC
rect%!0=0
rect%!4=0
rect%!8=(right%-left%)/400
rect%!12=(top%-bottom%)/400
trans%!0=1<<16
trans%!4=0
trans%!8=0
trans%!12=1<<16
plotat%!0=left%
plotat%!4=bottom%
SYS “PDriver_GiveRectangle”,0,rect%
,trans%,plotat%,&FFFFFF00
SYS “PDriver_DrawPage”,1,block%,0,0 TO more%
WHILE more%
SYS “ColourTrans_SetGCOL”,0
MOVE 0,(top%-bottom%)/400
............
(BASIC print commands − see text)
............
SYS “PDriver_GetRectangle”,,block% TO more%
ENDWHILE
SYS “PDriver_EndJob”,pf%
RESTORE ERROR
CLOSE# pf%
ENDPROC
8.11
The above assumes that you have a global error call in
operation, and you will need to add to the ON ERROR LOCAL line to
restore to that call. Also, you need to have declared certain variables
earlier in the program, such as...
8.11
DIM rect% 16
DIM trans% 16
DIM plotat% 8
DIM block% 16
8.11
All the normal Basic printing commands seem to work OK, i.e.
PRINT, PRINT TAB(), VDU8, 9, 10 and 11, but be careful of VDU28 and 31
(and, of course, VDU1).
8.11
With care, you can therefore merely insert (at Basic’s print
commands above) the call to whatever routine puts your required text
onto the screen.
8.11
Secondly, what about using of text files? Although it isn’t
printing directly from Basic, there are some advantages in using text
files, as others have noted − not least being that your printer driver
is likely to use ‘character printing’, and you can view and edit via
Edit, if you want.
8.11
Extending the thoughts offered by others (and assuming you want
to get a hard copy of something you’ve put on the screen) then the
following PROCs can be used to put text line by line on the screen in
the way you want it and, at the same time, construct a corresponding
text file for subsequent dragging to your Printer Driver or into !Edit.
8.11
10 MODE27
20 file%=OPENOUT(“textfile”)
30 CLOSE#file%
32 *SetType textfile Text
40 PROCfile_and_centreprint(“Text File Test”)
50 PROCfile_and_blankline
60 PROCfile_and_printtab(10,“First Line at TAB 10”,TRUE)
70 PROCfile_and_printtab(10,“Second Line at TAB 10, but held ”,FALSE)
80 PROCfile_and_printtab(50,“to await this at TAB 50”,TRUE)
90 END
10000
10010 DEF PROCtextfile(textline$, return%)
10020 REM return% is TRUE/FALSE flag
10030 REM to tell BPUT# to make
<RETURN> action after text or not
10040 file%=OPENUP(“textfile”)
10050
10060 REM Put pointer to end of file ready for more text.
10070 PTR#file%=EXT#file%
10080
10090 IF return% THEN
10100 BPUT#file%,textline$
10110 ELSE
10120 BPUT#file%,textline$;
10130 ENDIF
10140 CLOSE#file%
10150 ENDPROC
10160
10190 DEF PROCfile_and_centreprint
(string$)
10200 REM Prints a string centred on screen,
10210 REM and puts a corresponding string into a text file.
10220
10230 LOCAL tab%,screenwidth%
10240 REM First find screenwidth in Mode being used,
10250 SYS “OS_ReadModeVariable”,-1,1 TO ,,screenwidth%
10260
10270 tab%=((screenwidth%+1)-LEN(string$)) DIV 2
10280 PRINT TAB(tab%)string$:REM To screen
10290
10300 line$=STRING$(tab%,“ ”)+string$
10310 PROCtextfile(line$,TRUE):REM Corresponding string to text file
10320 ENDPROC
10330
10360 DEF PROCfile_and_blankline
10370 REM Prints an empty line on screen,
10380 REM and puts a corresponding string into a text file.
10400 PRINT:REM To screen
10420 line$=“”
10430 PROCtextfile(line$,TRUE):REM Corresponding string to text file
10440 ENDPROC
10450
10480 DEF PROCfile_and_printtab(tab%,string$,crlf%)
10490 REM Prints a string on screen at the designated tab position,
10500 REM and returns a corresponding string for a text file.
10510 REM ‘crlf%’ is TRUE/FALSE flag to determine if screen printing
10520 REM** is to end with <Return> or not (i.e. semi-colon or not).
10530
10540 gap%=tab%-POS
10550 REM ‘gap%’ needs to be calculated before printing to screen.
10560
10570 IF crlf% THEN
10580 PRINT TAB(tab%)string$
10590 ELSE
10600 PRINT TAB(tab%)string$;
10610 ENDIF
10620
10630 line$=STRING$(gap%,“ ”)+string$
10640 PROCtextfile(line$,crlf%):REM Corresponding string to text file
10650 ENDPROC
8.11
I am still trying to get ‘character printing’ via a Printer
Driver direct from Basic!
8.11
(We have one that we have used at NCS for years. I’ll put it on
the monthly disc. Is that what you want? Ed.)
8.11
Ray Favre, West Drayton
8.11
Runny letters − Some people don’t realise that the ink used by
inkjet printers is water-based and is therefore not waterproof. This
isn’t normally a problem but it can become one when addressing
envelopes! In rainy weather, my postman often delivers letters where the
address is all but illegible, and if the ink had run in this way before
it had reached my local sorting office, I would probably never have
received it.
8.11
The solution is very simple. Most stationers sell a ‘fixer’ for
use with rub down lettering (Letraset etc.). This is actually a very
fine, clear, varnish in aerosol form. It’s quite expensive, around £3,
but a can will last many years. Just lightly spray it on the address or
label (it dries in a few seconds) and your letter will arrive safely
even in a monsoon.
8.11
David Holden, APDL
8.11
Transferring text files using Hermes − There is an increasing
interest these days in exchanging text files between Acorn RISC
computers and PCs. There are two major differences − PC text files end
with a ctrl-Z (ASCII 26) character and have CR LF (ASCII 13 + ASCII 10)
characters at the end of each line. Acorn text files have only an LF
character at the end of a line and have no special end character. Hermes
(v1.22 onwards) is able to handle most of the conversion in either
direction.
8.11
To convert an Acorn file to PC, open the Hermes application
window and display the Pipe parameters. Change the Line End to CRLF and
click on “OK”. Drag the text file to Edit, use <ctrl-down> to move the
cursor to the end of the file and add ¤CTRLZ¤, then resave. Ensuring
that no application has the input caret, drag the text file onto the
Hermes iconbar icon. After a few moments, the converted file will be
piped to Edit where it can be saved to the DOS disc.
8.11
To convert a PC file to Acorn, change the DOS file to Text
(&FFF) and open an Edit document, making sure it has the input focus.
Drag the DOS file onto the Hermes iconbar icon and the converted file
will be sent direct to the edit document with all the CR characters
stripped out. The ctrl-Z character at the end can be deleted manually.
8.11
Hermes raison d’etre is to facilitate transfer between packages
and this cross-platform interchange is an extension of that philosophy.
8.11
Mike Logan, Base 5 Technical Graphics
8.11
Underlining Impression’s bugs − If you are editing a style, and
adding ‘Underlines 2’ to it in Publisher (4.05), make sure that any
existing text in that style does not have underlines set as an effect.
If the effect is set, strange things happen, and the window goes black!
8.11
Brian Cocksedge, Midhurst, W Sussex u
8.11